<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Vue 原理实现</title>
  </head>
  <body>
    <div id="app">
      <h2>{{ msg }}</h2>
      <div v-text="msg"></div>
      <input type="text" v-model="msg" />
      <input type="text" v-model="count" />
      <div v-html="html"></div>
      <button v-on:click="console">点我</button>
    </div>
    <script src="./dep.js"></script>
    <script src="./watch.js"></script>
    <script src="./compiler.js"></script>
    <script src="./observer.js"></script>
    <script src="./vue.js"></script>
    <script>
      let vm = new Vue({
        el: '#app',
        data: {
          msg: 'Hello world',
          count: 10,
          html: '<h3>这是一个 h3 </h3>',
        },
        methods: {
          console() {
            console.log('ok');
          },
        },
      });
    </script>
  </body>
</html>
